﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.TeamFoundation.WorkItemTracking.Client;

namespace Hierarchy_Maker
{
    public class LinkTypeItem
    {
        public bool CanEdit { get; set; }
        public WorkItemLinkTypeEnd ReverseEnd { get; set; }
        public bool IsOneToMany { get; set; }
        public bool IsDirectional { get; set; }
        public string ReferenceName { get; set; }
        public bool IsActive { get; set; }
        public WorkItemLinkType.Topology LinkTopology { get; set; }
        public bool IsNonCircular { get; set; }
        public WorkItemLinkTypeEnd ForwardEnd { get; set; }
        public bool CanDelete { get; set; }

        public LinkTypeItem(WorkItemLinkType type)
        {
            this.CanDelete = type.CanDelete;
            this.CanEdit = type.CanEdit;
            this.ForwardEnd = type.ForwardEnd;
            this.IsActive = type.IsActive;
            this.IsDirectional = type.IsDirectional;
            this.IsNonCircular = type.IsNonCircular;
            this.IsOneToMany = type.IsOneToMany;
            this.LinkTopology = type.LinkTopology;
            this.ReferenceName = type.ReferenceName;
            this.ReverseEnd = type.ReverseEnd;
        }

        public override string ToString()
        {
            return this.ReferenceName;
        }
    }
}
